From: Jo-Philipp Wich Date: Tue, 1 Jun 2021 13:27:24 +0000 (+0200) Subject: luci-mod-network: rename "device" option to "_net_device" internally X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=56cd1abbe850d6482db964e2dec3055441a7a2cf;p=project%2Fluci.git luci-mod-network: rename "device" option to "_net_device" internally This is required to resolve conflicts with the existing "device" option in other proto handlers such as PPP or QMI where "device" refers to the device path of the tty control device instead of a netdev name. Signed-off-by: Jo-Philipp Wich (cherry picked from commit 10f02472c5fdab72615a7d3695e8f354811cd661) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index eacb2fb416..a8e289c480 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -521,7 +521,8 @@ return view.extend({ .then(L.bind(this.renderMoreOptionsModal, this, s.section)); }, this); - o = s.taboption('general', widgets.DeviceSelect, 'device', _('Device')); + o = s.taboption('general', widgets.DeviceSelect, '_net_device', _('Device')); + o.ucioption = 'device'; o.nobridges = false; o.optional = false; o.network = ifc.getName(); @@ -888,7 +889,7 @@ return view.extend({ case 'igmp_snooping': case 'stp': case 'type': - case 'device': + case '_net_device': var deps = []; for (var j = 0; j < protocols.length; j++) { if (!protocols[j].isVirtual()) {